{include file="news/header.tpl"}


<!-- 头部// -->
{include file="csv/top.tpl"}


	<!-- start: Content -->
			<div id="content" class="span12">
			
						
			<div class="row-fluid">


<div class="box span12"><!-- Default panel contents -->



<div class="span12">
<div class="form-inline pull-left"><span
	class="glyphicon glyphicon-search"></span> <select name="type" id="key">
	<option value="jxs" selected>经销商</option>
	<option value="id" >流水号</option>
	<option value="mobile_phone" >手机号码</option>
	<option value="customer" >业主姓名</option>
	<option value="man">区域经理</option>

</select>

	<div class="input-append">

<input  class="span8" name="value" id="value" 
	type="text">
<button class="btn btn-default" type="button" onclick="search()"><i class="icon-search"></i></button>
</div>

</div>
<div class="pull-left">
<form  action="./index.php?csv/import" method="post"
	enctype="multipart/form-data" >

			<div class="uploader" id="uniform-fileInput"><input class="input-file uniform_on" name="file" id="fileInput" type="file"><span class="filename" style="-webkit-user-select: none; ">No file selected</span><span class="action" style="-webkit-user-select: none; ">Choose File</span></div>
	
 <input type="submit" class="btn btn-warning" value="批量审核">
 	
 
</form>

</div>


	<div class="pull-right" style="line-height:35px;">  已通过{$stat.pass}单合计{$money},中奖{$stat.reward}单,为你找到 <span class="badge badge-important">{$num.total}</span> 条记录</div>

</div>

<div class="form-inline span12" style="margin-left:0px;padding-bottom:5px;">
<select name="type" id="type" class="span2">
<option value="1" >全部</option>
<option value="2" selected>等待审核</option>
<option value="3">审核通过</option>
<option value="4">已中奖</option>
</select>
从ID <input name="id" id="id" type="text" class="span2" value="0" >
<a href="javascript:daochu()" class="btn btn-success"><i class="icon-upload-alt">导出</i></a>
</div>
<table class="table   table-hover">
	<tr class=title>
	   <th>流水号</th>
		<th>时间</th>
		<th>经销商</th>
		<th>军区</th>
		<th>城市区域</th>
		<th>业主姓名</th>
		<th>业主手机</th>
		<th>业主地址</th>
		<th>定金金额</th>
		<th>区域经理</th>
		<th>操作</th>
	</tr>




	{section name=l loop=$news }
	<tr id="dd{$news[l].id}">
	<td>{$news[l].id}</td>
		<td>{$news[l].add_time|date_format:"%m-%d %H:%M"}</td>
		<td>
		<a href="/index.php?csv/search/?key=jxs&value={$news[l].jxs}">{$news[l].jxs}</a></td>
		<td>{$news[l].junqu}</td>
		<td>{$news[l].area}</td>
	    <td>{$news[l].customer}</td>
	    	    	    <td>{$news[l].mobile_phone}</td>
	    
	    	    <td>{$news[l].address}</td>
	    	    	    	    <td>{$news[l].money}</td>
	    	    	    	    	    <td>
	    	    	    	    	    
	    	    	    	    	    <a href="/index.php?csv/search/?key=man&value={$news[l].man}">{$news[l].man}</a></td>
	    	    
	    	    
	    
		<td width="12%">
		
		{if $news[l].status==0}
		<span class="label label-warning">等待审核</span>
		<a href="javascript:del({$news[l].id})">删?</a>
		
		{elseif $news[l].status==1}
		<span class="label label-success">通过</span>
		{elseif $news[l].status==2}
		<span class="label label-important">已中奖</span>
		{else}
		<span class="label label-default">不通过</span>
		{/if}
		</td>
	</tr>
	{/section}

</table>

<div class="pagination pagination-centered">
<ul id="pager"></ul></div>

</div>


</div>



<script src="./static/public/layer/layer.min.js" ></script>

{literal}
<script type='text/javascript'>

function daochu(){
	
var id=$("#id").val();
var type=$("#type").val();
location.href='./index.php?csv/exportall/?id='+id+'&type='+type;
}

function del(id){

   if(confirm("确认删除")){
  $.post("./index.php?csv/del",{id:id},function(data){
     alert(data.message);
     if(data.status==1){
     $("#dd"+id).remove();
     }
	  },"json")
	
   }
}

function search(){
var key=$("#key").val();
var value=$("#value").val();
location.href="./index.php?csv/search/?key="+key+"&value="+value;
	}

function detail(sno){
$.layer({
    type: 2,
    shadeClose: true,
    title: false,
    closeBtn: [0, true],
    shade: [0.8, '#000'],
    border: [0],
    offset: ['20px',''],
    area: ['820px', ($(window).height() - 50) +'px'],
    iframe: {src: './index.php?order/i/?sno='+sno,
        scrolling: 'yes'
         }
}) 
}

var options = {
currentPage: {/literal}{$num.current}{literal},
totalPages: {/literal}{$num.page}{literal},
numberOfPages:5,
bootstrapMajorVersion:3,
pageUrl: function(type, page, current){
    return "./index.php?csv/listing/?p="+page;
}
}
$('#pager').bootstrapPaginator(options);



function setStatus(orderno,status){
$.post("./index.php?order/setstatus",{orderno:orderno,status:status},function(data){

	if(data.message!="success"){
alert(data.message);
return;
	}
$("#"+orderno).hide();
if(status==8){
$("#zt_"+orderno).html("<span class='label label-success'>成功</span>");
}
if(status==-1){
	$("#zt_"+orderno).html("<span class='label label-default'>关闭</span>");

}

},"json")
}

</script>
{/literal}

{include file="news/footer.tpl"}
